﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.ImportMFGsFromFile.CApImportMFGsFromFileCmd
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using DnProcessSimulateCommands.ImportMFGsFromFile.Resources;
using System;
using System.Windows.Forms;
using Tecnomatix.Engineering;
using Tecnomatix.Engineering.PrivateImplementationDetails;
using Tecnomatix.Engineering.Ui;


namespace DnProcessSimulateCommands.ImportMFGsFromFile;

public class CApImportMFGsFromFileCmd : TxButtonCommand
{
  private CApImportMFGsFromFileEnabler enabler;

  public CApImportMFGsFromFileCmd() => this.enabler = new CApImportMFGsFromFileEnabler();

  public virtual ITxCommandEnabler CommandEnabler => (ITxCommandEnabler) this.enabler;

  public virtual string Bitmap => "ImportMFGsFromFile.Resources.cmdIcon.bmp";

  public virtual string LargeBitmap => "ImportMFGsFromFile.Resources.cmdIcon_Large.png";

  public virtual string Category => IMFFResources.IMFF_CATEGORY;

  public virtual string Tooltip => IMFFResources.IMFF_TOOLTIP;

  public virtual string Name => IMFFResources.IMFF_NAME;

  public virtual string Description
  {
    get
    {
      return TxTcUtilities.IsTcAnyPlatform ? IMFFResources.IMFF_TC_DESCRIPTION : IMFFResources.IMFF_DESCRIPTION;
    }
  }

  public virtual bool Licensed => TxCommandLicenser.ImportMfgsLicense;

  public virtual ITxImage Image => (ITxImage) TxImageManager.GetImageByKey("ImportMfgs");

  public virtual void Execute(object cmdParams)
  {
    try
    {
      new CUiImportMFGsFromFileDialog().InnerExecute();
    }
    catch (Exception ex)
    {
      int num = (int) TxMessageBox.Show(IMFFResources.IMFF_GENERAL_ERROR, IMFFResources.IMFF_NAME, MessageBoxButtons.OK, MessageBoxIcon.Hand);
    }
  }
}
